package com.kehutong.house.enums;

import org.coraframework.util.HashID;

public enum DeviceManagementType implements HashID {
    NBOUND ("0", "未绑定"),
    BOUND("1", "已绑定"),
    ;


    private final String id;
    private final String desc ;

    public static DeviceManagementType get(String desc) {
        DeviceManagementType[] buildTypes = values();
        for (DeviceManagementType buildType : buildTypes) {
            if (buildType.getDesc().equals(desc)) {
                return buildType;
            }
        }
        return null;
    }

    private DeviceManagementType(String id, String desc) {
        this.id = id;
        this.desc = desc ;
    }

    @Override
    public String getId() {
        return id;
    }

    @Override
    public String getDesc() {
        return desc;
    }
}
